<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../themes/default/om-all.css">
<link rel="stylesheet" href="../common/css/demo.css">
<script src="../../jquery.js"></script>
<script src="../../ui/om-core.js"></script>
<script type="text/javascript" src="../../ui/om-menu.js"></script>
<title>分组菜单</title>
<!-- view_source_begin -->
<script type="text/javascript">
  $(document).ready(function(){
      $('#menu_json').omMenu({
          minWidth : 150,
          maxWidth : 230,
          dataSource : [{id:'001',label:'苹果'},
                        {id:'002',label:'梨子'},
                        {id:'003',label:'水蜜桃'},
                        {id:'004',label:'西瓜',seperator:true},
                        {id:'005',label:'大白菜',icon : 'images/calendar.gif',
                           children:[
                                {id:'005001',label:'节点二一',url:'abc.html'},
                                {id:'005002',icon : 'images/calendar.gif',label:'节点二二',url:'abc.html'}
                           ]
                        },
                        {id:'006',label:'上海青'},
                       ]
      });
      $('#btn1').click(function(){
          $('#menu_json').omMenu('show',this);
      });
  });
</script>
<!-- view_source_end -->
</head>
<body>
    <!-- view_source_begin -->
    <input type="button" id="btn1" value="本地配置json数据生成menu">
    <div id="menu_json"></div>
    <!-- view_source_end -->
    <div id="view-desc">
      <p>设置seperator属性，会在菜单项里显示分割符，实现分组菜单。
      </p>
    </div>
    <script type="text/javascript" src="../common/js/themeloader.js"></script>
</body>
</html>